home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / OWLINC.PAK / OLEDIALG.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  88 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // Copyright (c) 1995, 1997 by Borland International, All Rights Reserved
  4. //
  5. //$Revision:   10.7  $
  6. //
  7. // Definition of class TOleDialog, a TDialog that can host OLE controls.
  8. //----------------------------------------------------------------------------
  9. #if !defined(OWL_OLEDIALG_H)
  10. #define OWL_OLEDIALG_H
  11.  
  12. // Class name of stub control within a dialog which TOleDialog replaces with
  13. // an OCX at runtime. The caption of the control contains the ProgID of the
  14. // OCX to be created by TOleDialog.
  15. //
  16. #if !defined(OCX_STUB_CLASS)
  17. # define OCX_STUB_CLASS "OCX"
  18. #endif
  19.  
  20. #if !defined(RC_INVOKED)
  21.  
  22. #if !defined(OWL_DIALOG_H)
  23. # include <owl/dialog.h>
  24. #endif
  25. #if !defined(OWL_OLEWINDO_H)
  26. # include <owl/olewindo.h>
  27. #endif
  28.  
  29. // Check that we're being used for a WIN32 target
  30. //
  31. #if !defined(BI_PLAT_WIN32)
  32. # error OWL/OLEDIALOG.H can be used for WIN32 Targets only.
  33. #endif
  34.  
  35. #if defined(BI_NAMESPACE)
  36. namespace OWL {
  37. #endif
  38.  
  39. // Generic definitions/compiler options (eg. alignment) preceeding the
  40. // definition of classes
  41. #include <services/preclass.h>
  42.  
  43. //
  44. // class TOleDialog
  45. // ~~~~~ ~~~~~~~~~~
  46. class _USERCLASS TOleDialog : public TOleWindow, public TDialog {
  47.   public:
  48.     TOleDialog(TWindow* parent, TResId resId, TModule* module = 0);
  49.    ~TOleDialog();
  50.  
  51.     void      SetupWindow();
  52.     bool      IdleAction(long idleCount);
  53.     bool      PreProcessMsg(MSG& msg);
  54.  
  55.   protected:
  56.     bool      EvOcViewSetSiteRect(TRect far* rect);
  57.  
  58.   protected:
  59.     HWND      CheckChild(HWND);
  60.     void      LoadControl(HWND hControl);
  61.     void      LoadControl(TString ProgId, TRect position);
  62.  
  63.   DECLARE_RESPONSE_TABLE(TOleDialog);
  64. };
  65.  
  66. //
  67. // class TRegisterOcxWnd
  68. // ~~~~~ ~~~~~~~~~~~~~~~
  69. class _USERCLASS TRegisterOcxWnd {
  70.   public:
  71.     TRegisterOcxWnd(HINSTANCE);
  72.    ~TRegisterOcxWnd();
  73.  
  74.   protected:
  75.     HINSTANCE HAppInst;
  76. };
  77.  
  78. // Generic definitions/compiler options (eg. alignment) following the
  79. // definition of classes
  80. #include <services/posclass.h>
  81.  
  82. #if defined(BI_NAMESPACE)
  83. } // namespace OWL
  84. #endif
  85.  
  86. #endif  // !RC_INVOKED
  87. #endif  // OWL_OLEDIALG_H
  88.